#@layout() #define main()
<div class="xp-layout">
	<div class="form_box">
		<form action="xpUser/changePassword" method="post" class="layui-form">
			<fieldset style="border: none;">
				<legend></legend>
				<input type="hidden" name="ID" value="#(ID??)" />
				<div>
					<div class="layui-form-item">
						<div class="layui-inline col-12 col-sm-24">
							<label class="layui-form-label col-6 col-sm-6">新密码</label>
							<div class="layui-input-inline col-18 col-sm-16">
								<input type="password" name="password1" id="password1" lay-verify="required" autocomplete="off" placeholder="请输入新密码" class="layui-input">
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline col-12 col-sm-24">
							<label class="layui-form-label col-6 col-sm-6">密码验证</label>
							<div class="layui-input-inline col-18 col-sm-16">
								<input type="password" name="password2" id="password2" lay-verify="required" autocomplete="off" placeholder="请再输一遍新密码" class="layui-input">
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<div style="text-align: center;">
							<button class="layui-btn" lay-submit="" lay-filter="demo1">修改</button>
						</div>
					</div>
				</div>
				<script src="_common/js/md5.js"></script>
				<script src="_common/js/xpsoft.js"></script>
				<script>
		
					layui.use(['form', 'laydate','element'], function(){
						var form = layui.form
						,layer = layui.layer
						,laydate = layui.laydate;
						  
					  //监听提交
						form.on('submit(demo1)', function(data){
							var pwd = $("#password1").val();
							if(xpsoft.checkPass(pwd)<3)
							{
								alert("密码强度低,密码必须是字母大写，字母小写，数字，特殊字符中任意三个组合。");
								return false;
							}
							$("#password1").val(MD5($("#password1").val()));
							$("#password2").val(MD5($("#password2").val()));
							//layer.alert(JSON.stringify(data.field), { title: '最终的提交信息' });
							//return false;
							
						});
					});
					$(function(){		
						#if(msg)
							xpsoft.msg('#(msg)');
						#end
					});			
					
				</script>
			</fieldset>

		</form>
	</div>
</div>
#end
